package com.example.demo.model;

import java.util.Objects;

public class Position {
    private String Phone;
    private double Latitude;
    private double Longitude;
    private boolean SOS = false;

    @Override
    public String toString() {
        return "{" +
                "Phone=" + Phone +
                ", Latitude=" + Latitude +
                ", Longitude=" + Longitude +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Position)) return false;
        Position position = (Position) o;
        return Phone == position.Phone;
    }

    public boolean getSOS() {
        return SOS;
    }

    public void setSOS(boolean SOS) {
        this.SOS = SOS;
    }

    @Override
    public int hashCode() {
        return Objects.hash(Phone);
    }

    public String getPhone() {
        return Phone;
    }

    public void setPhone(String phone) {
        Phone = phone;
    }

    public double getLatitude() {
        return Latitude;
    }

    public void setLatitude(double latitude) {
        Latitude = latitude;
    }

    public double getLongitude() {
        return Longitude;
    }

    public void setLongitude(double longitude) {
        Longitude = longitude;
    }

    public Position(String phone, double latitude, double longitude) {
        Phone = phone;
        Latitude = latitude;
        Longitude = longitude;
    }
}
